package com.zikao.config.web;

import com.zikao.user.entity.UserEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author: Likaisheng
 * @Description: 该控制器用于处理首页跳转、登录注册页跳转、后台管理页面跳转
 * @Date: Created in 13:49:37 2021-01-26
 * @Modified By:
 */
@Controller
public class IndexController {

    /**
     * 首页
     * @param model
     * @return
     */
    @GetMapping({"index.html","index","/"})
    public String indexPage(Model model){
        model.addAttribute("curPage","index");
        return "index";
    }

    /**
     * 登录页
     * @param model
     * @return
     */
    @GetMapping({"loginPage","login.html"})
    public String loginPage(Model model){
        return "login";
    }

    /**
     * 注册页
     * @param model
     * @return
     */
    @GetMapping({"registPage","regist.html"})
    public String registPage(Model model){
        return "regist";
    }

    /**
     * 后台管理页面
     * @return
     */
    @GetMapping("managePage")
    public String managePage(){
        return "manage";
    }

}
